﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
using System.Windows.Forms;

namespace IndexingService
{
    class ConfigReader
    {

        private string _configFile = null;
        public string ConfigFile
        {
            get { return _configFile; }
            set {
                if (System.IO.File.Exists(value))
                    _configFile = value;
            }
        }

        public void load()
        {
            // check if config file can be read
            XmlDocument doc = new XmlDocument();
            doc.Load(_configFile);

            XmlNode root = doc.DocumentElement;
            XmlNode author;
            author = root.SelectSingleNode("author");

            MessageBox.Show(author.InnerText);

        }
    }
}
 